/*
 * CampaignEditorWindow.h
 *
 *  Created on: 12/06/2014
 *      Author: javier
 */

#ifndef CAMPAIGNEDITORWINDOW_H_
#define CAMPAIGNEDITORWINDOW_H_

#include <gtkmm.h>
#include "Campania.h"
#include "EditorController.h"
#include "Properties.h"

class LevelEditorWindow;

using namespace Gtk;

class CampaignEditorWindow: public Gtk::Window {
public:
	CampaignEditorWindow(BaseObjectType* cobject,
			const Glib::RefPtr<Gtk::Builder>& refGlade);
	virtual ~CampaignEditorWindow();
	void setCampania(Campania* c);
	void save();
	void newScenario();
	void editScenario();

	void loadCampaignInfo();

	const LevelEditorWindow* getLevelEditor() const;
	void setLevelEditor(LevelEditorWindow* levelEditor);
	void setController( EditorController* controller);

private:
	Campania *campania;
	Gtk::Button *btnNewScenario;
	Gtk::Button *btnSave;
	Gtk::Button *btnEdit;

	Gtk::Entry *inputIDCampaign;
	Gtk::Entry *inputCantPlayers;
	Gtk::Entry *inputDificultad;
	Gtk::Entry *inputName;
	Gtk::Entry *inputImage;

	Gtk::Entry *inputNewLevelX;
	Gtk::Entry *inputNewLevelY;

	Gtk::ComboBox* comboLevels;

	Gtk::Grid *gridLevel;

	EditorController* controller;

	Properties properties;

	LevelEditorWindow* levelEditor;

	int newLevelX, newLevelY;
};

#endif /* CAMPAIGNEDITORWINDOW_H_ */
